<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">


<ui:composition template="IndexAdmin.xhtml">
	
	<ui:define name="conteudo">
		<f:loadBundle basename="br.ucb.jogo.recursos.messages" var="msg" />
		<h:form>
			<center>
				<p:panel header="#{msg.CADASTRO_DE_CLASSE}">
					<p:panelGrid columns="3" id="painelCadastroClasse" style="width:500px;">
						<h:outputLabel value="#{msg.NOME}: "/>
						<p:inputText id="descricao" required="true" value="#{classeManagedBean.classe.nome}" style="width:500px">
							<f:validateLength minimum="3" maximum="35"/>
						</p:inputText>
						<h:message for="descricao" showSummary="true" showDetail="false" errorStyle="color:red" id="ErroDescricao"/>
						
						<h:outputLabel value="#{msg.FORCA}: "/>
						<p:inputText id="forca"  required="true" value="#{classeManagedBean.classe.forca}" style="width:500px">
							<f:validateLongRange  minimum="0"/> 
						</p:inputText>
						<h:message for="forca" showSummary="true" showDetail="false" errorStyle="color:red"/>
						
						<h:outputLabel value="#{msg.AGILIDADE}: "/>
						<p:inputText id="agilidade" required="true"  value="#{classeManagedBean.classe.agilidade}" style="width:500px">
							<f:validateLongRange  minimum="0"/>
						</p:inputText>
						<h:message for="agilidade" showSummary="true" showDetail="false" errorStyle="color:red"/>
						
						<h:outputLabel value="#{msg.DEFESA}: "/>
						<p:inputText id="defesa"  required="true" value="#{classeManagedBean.classe.defesa}" style="width:500px">
							<f:validateLongRange  minimum="0"/>
						</p:inputText>
						<h:message for="defesa" showSummary="true" showDetail="false" errorStyle="color:red"/>
						
						<h:outputLabel value="#{msg.MANA}: "/>
						<p:inputText id="mana"  required="true"  value="#{classeManagedBean.classe.mana}" style="width:500px">
							<f:validateLongRange  minimum="0"/>
						</p:inputText>
						<h:message for="mana" showSummary="true" showDetail="false" errorStyle="color:red"/>
						
					</p:panelGrid>
					<p:commandButton value="#{msg.ENVIAR}" action="#{classeManagedBean.save}" ajax="false"/> 
				</p:panel>
			</center>
		</h:form>
	</ui:define>
</ui:composition>
</html>